/* tslint:disable */
/* eslint-disable */
/*
Humanloop API

The Humanloop API allows you to interact with Humanloop from your product or service.

You can do this through HTTP requests from any language or via our official Python or TypeScript SDK.

To install the official [Python SDK](https://pypi.org/project/humanloop/), run the following command:

```bash
pip install humanloop
```

To install the official [TypeScript SDK](https://www.npmjs.com/package/humanloop), run the following command:

```bash
npm i humanloop
```

---

Guides and further details about key concepts can be found in [our docs](https://docs.humanloop.com/).

The version of the OpenAPI document: 4.0.1


NOTE: This file is auto generated by Konfig (https://konfigthis.com).
*/

import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, isBrowser } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { CreateProjectRequest } from '../models';
// @ts-ignore
import { EnvironmentProjectConfigRequest } from '../models';
// @ts-ignore
import { EnvironmentProjectConfigResponse } from '../models';
// @ts-ignore
import { EnvironmentRequest } from '../models';
// @ts-ignore
import { FeedbackClass } from '../models';
// @ts-ignore
import { FeedbackLabelRequest } from '../models';
// @ts-ignore
import { FeedbackTypeModel } from '../models';
// @ts-ignore
import { FeedbackTypeRequest } from '../models';
// @ts-ignore
import { GetModelConfigResponse } from '../models';
// @ts-ignore
import { HTTPValidationError } from '../models';
// @ts-ignore
import { PaginatedDataLogResponse } from '../models';
// @ts-ignore
import { PaginatedDataProjectResponse } from '../models';
// @ts-ignore
import { PositiveLabel } from '../models';
// @ts-ignore
import { ProjectConfigResponse } from '../models';
// @ts-ignore
import { ProjectResponse } from '../models';
// @ts-ignore
import { ProjectSortBy } from '../models';
// @ts-ignore
import { SortOrder } from '../models';
// @ts-ignore
import { UpdateProjectRequest } from '../models';
import { paginate } from "../pagination/paginate";
import type * as buffer from "buffer"
import { requestBeforeHook } from '../requestBeforeHook';
/**
 * ProjectsApi - axios parameter creator
 * @export
 */
export const ProjectsApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * Create a new project.
         * @summary Create
         * @param {CreateProjectRequest} createProjectRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        create: async (createProjectRequest: CreateProjectRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'createProjectRequest' is not null or undefined
            assertParamExists('create', 'createProjectRequest', createProjectRequest)
            const localVarPath = `/projects`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: createProjectRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects',
                httpMethod: 'POST'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(createProjectRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * 
         * @summary Create Feedback Type
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {FeedbackTypeRequest} feedbackTypeRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createFeedbackType: async (id: string, feedbackTypeRequest: FeedbackTypeRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('createFeedbackType', 'id', id)
            // verify required parameter 'feedbackTypeRequest' is not null or undefined
            assertParamExists('createFeedbackType', 'feedbackTypeRequest', feedbackTypeRequest)
            const localVarPath = `/projects/{id}/feedback-types`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: feedbackTypeRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/feedback-types',
                httpMethod: 'POST'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(feedbackTypeRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Remove the project\'s active config, if set.  This has no effect if the project does not have an active model config set.
         * @summary Deactivate Config
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {string} [environment] Name for the environment. E.g. \&#39;production\&#39;. If not provided, will delete the active config for the default environment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deactivateConfig: async (id: string, environment?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deactivateConfig', 'id', id)
            const localVarPath = `/projects/{id}/active-config`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (environment !== undefined) {
                localVarQueryParameter['environment'] = environment;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/active-config',
                httpMethod: 'DELETE'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Remove the project\'s active experiment, if set.  This has no effect if the project does not have an active experiment set.
         * @summary Deactivate Experiment
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {string} [environment] Name for the environment. E.g. \&#39;producton\&#39;. If not provided, will return the experiment for the default environment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deactivateExperiment: async (id: string, environment?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('deactivateExperiment', 'id', id)
            const localVarPath = `/projects/{id}/active-experiment`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (environment !== undefined) {
                localVarQueryParameter['environment'] = environment;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/active-experiment',
                httpMethod: 'DELETE'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Delete a specific project.
         * @summary Delete
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delete: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('delete', 'id', id)
            const localVarPath = `/projects/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}',
                httpMethod: 'DELETE'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Remove the model config deployed to environment.  This has no effect if the project does not have an active model config set.
         * @summary Delete Deployed Config
         * @param {string} projectId 
         * @param {string} environmentId 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDeployedConfig: async (projectId: string, environmentId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('deleteDeployedConfig', 'projectId', projectId)
            // verify required parameter 'environmentId' is not null or undefined
            assertParamExists('deleteDeployedConfig', 'environmentId', environmentId)
            const localVarPath = `/projects/{project_id}/deployed-config/{environment_id}`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId !== undefined ? projectId : `-project_id-`)))
                .replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId !== undefined ? environmentId : `-environment_id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{project_id}/deployed-config/{environment_id}',
                httpMethod: 'DELETE'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Deploy a model config to an environment.  If the environment already has a model config deployed, it will be replaced.
         * @summary Deploy Config
         * @param {string} projectId 
         * @param {EnvironmentProjectConfigRequest} environmentProjectConfigRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deployConfig: async (projectId: string, environmentProjectConfigRequest: EnvironmentProjectConfigRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('deployConfig', 'projectId', projectId)
            // verify required parameter 'environmentProjectConfigRequest' is not null or undefined
            assertParamExists('deployConfig', 'environmentProjectConfigRequest', environmentProjectConfigRequest)
            const localVarPath = `/projects/{project_id}/deploy-config`
                .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId !== undefined ? projectId : `-project_id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: environmentProjectConfigRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{project_id}/deploy-config',
                httpMethod: 'PATCH'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(environmentProjectConfigRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Export all logged datapoints associated to your project.  Results are paginated and sorts the datapoints based on `created_at` in descending order.
         * @summary Export
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {number} [page] Page offset for pagination.
         * @param {number} [size] Page size for pagination. Number of logs to export.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        export: async (id: string, page?: number, size?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('export', 'id', id)
            const localVarPath = `/projects/{id}/export`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }

            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/export',
                httpMethod: 'POST'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get a specific project.
         * @summary Get
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        get: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('get', 'id', id)
            const localVarPath = `/projects/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}',
                httpMethod: 'GET'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Retrieves a config to use to execute your model.  A config will be selected based on the project\'s active config/experiment settings.
         * @summary Get Active Config
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {string} [environment] Name for the environment. E.g. \&#39;producton\&#39;. If not provided, will return the active config for the default environment.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getActiveConfig: async (id: string, environment?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('getActiveConfig', 'id', id)
            const localVarPath = `/projects/{id}/active-config`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (environment !== undefined) {
                localVarQueryParameter['environment'] = environment;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/active-config',
                httpMethod: 'GET'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get a paginated list of projects.
         * @summary List
         * @param {number} [page] Page offset for pagination.
         * @param {number} [size] Page size for pagination. Number of projects to fetch.
         * @param {string} [filter] Case-insensitive filter for project name.
         * @param {string} [userFilter] Case-insensitive filter for users in the project. This filter matches against both email address and name of users.
         * @param {ProjectSortBy} [sortBy] Field to sort projects by
         * @param {SortOrder} [order] Direction to sort by.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        list: async (page?: number, size?: number, filter?: string, userFilter?: string, sortBy?: ProjectSortBy, order?: SortOrder, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/projects`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }

            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }

            if (filter !== undefined) {
                localVarQueryParameter['filter'] = filter;
            }

            if (userFilter !== undefined) {
                localVarQueryParameter['user_filter'] = userFilter;
            }

            if (sortBy !== undefined) {
                localVarQueryParameter['sort_by'] = sortBy;
            }

            if (order !== undefined) {
                localVarQueryParameter['order'] = order;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects',
                httpMethod: 'GET'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get an array of configs associated to your project.
         * @summary List Configs
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {boolean} [evaluationAggregates] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listConfigs: async (id: string, evaluationAggregates?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('listConfigs', 'id', id)
            const localVarPath = `/projects/{id}/configs`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (evaluationAggregates !== undefined) {
                localVarQueryParameter['evaluation_aggregates'] = evaluationAggregates;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/configs',
                httpMethod: 'GET'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Get an array of environments with the deployed configs associated to your project.
         * @summary List Deployed Configs
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDeployedConfigs: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('listDeployedConfigs', 'id', id)
            const localVarPath = `/projects/{id}/deployed-configs`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/deployed-configs',
                httpMethod: 'GET'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update a specific project.  Set the project\'s active model config/experiment by passing either `active_experiment_id` or `active_model_config_id`. These will be set to the Default environment unless a list of environments are also passed in specifically detailing which environments to assign the active config or experiment.  Set the feedback labels to be treated as positive user feedback used in calculating top-level project metrics by passing a list of labels in `positive_labels`.
         * @summary Update
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {UpdateProjectRequest} updateProjectRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update: async (id: string, updateProjectRequest: UpdateProjectRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('update', 'id', id)
            // verify required parameter 'updateProjectRequest' is not null or undefined
            assertParamExists('update', 'updateProjectRequest', updateProjectRequest)
            const localVarPath = `/projects/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: updateProjectRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}',
                httpMethod: 'PATCH'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(updateProjectRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update feedback types.  Allows enabling the available feedback types and setting status of feedback types/categorical values.  This behaves like an upsert; any feedback categorical values that do not already exist in the project will be created.
         * @summary Update Feedback Types
         * @param {string} id String ID of project. Starts with &#x60;pr_&#x60;.
         * @param {Array<FeedbackTypeRequest>} feedbackTypeRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateFeedbackTypes: async (id: string, feedbackTypeRequest: Array<FeedbackTypeRequest>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('updateFeedbackTypes', 'id', id)
            // verify required parameter 'feedbackTypeRequest' is not null or undefined
            assertParamExists('updateFeedbackTypes', 'feedbackTypeRequest', feedbackTypeRequest)
            const localVarPath = `/projects/{id}/feedback-types`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: feedbackTypeRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/projects/{id}/feedback-types',
                httpMethod: 'PATCH'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(feedbackTypeRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * ProjectsApi - functional programming interface
 * @export
 */
export const ProjectsApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = ProjectsApiAxiosParamCreator(configuration)
    return {
        /**
         * Create a new project.
         * @summary Create
         * @param {ProjectsApiCreateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async create(requestParameters: ProjectsApiCreateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectResponse>> {
            const createProjectRequest: CreateProjectRequest = {
                name: requestParameters.name,
                feedback_types: requestParameters.feedback_types,
                directory_id: requestParameters.directory_id
            };
            const localVarAxiosArgs = await localVarAxiosParamCreator.create(createProjectRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * 
         * @summary Create Feedback Type
         * @param {ProjectsApiCreateFeedbackTypeRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createFeedbackType(requestParameters: ProjectsApiCreateFeedbackTypeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedbackTypeModel>> {
            const feedbackTypeRequest: FeedbackTypeRequest = {
                type: requestParameters.type,
                values: requestParameters.values,
                class: requestParameters.class
            };
            const localVarAxiosArgs = await localVarAxiosParamCreator.createFeedbackType(requestParameters.id, feedbackTypeRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Remove the project\'s active config, if set.  This has no effect if the project does not have an active model config set.
         * @summary Deactivate Config
         * @param {ProjectsApiDeactivateConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deactivateConfig(requestParameters: ProjectsApiDeactivateConfigRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deactivateConfig(requestParameters.id, requestParameters.environment, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Remove the project\'s active experiment, if set.  This has no effect if the project does not have an active experiment set.
         * @summary Deactivate Experiment
         * @param {ProjectsApiDeactivateExperimentRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deactivateExperiment(requestParameters: ProjectsApiDeactivateExperimentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deactivateExperiment(requestParameters.id, requestParameters.environment, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Delete a specific project.
         * @summary Delete
         * @param {ProjectsApiDeleteRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async delete(requestParameters: ProjectsApiDeleteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.delete(requestParameters.id, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Remove the model config deployed to environment.  This has no effect if the project does not have an active model config set.
         * @summary Delete Deployed Config
         * @param {ProjectsApiDeleteDeployedConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteDeployedConfig(requestParameters: ProjectsApiDeleteDeployedConfigRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDeployedConfig(requestParameters.projectId, requestParameters.environmentId, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Deploy a model config to an environment.  If the environment already has a model config deployed, it will be replaced.
         * @summary Deploy Config
         * @param {ProjectsApiDeployConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deployConfig(requestParameters: ProjectsApiDeployConfigRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<EnvironmentProjectConfigResponse>>> {
            const environmentProjectConfigRequest: EnvironmentProjectConfigRequest = {
                config_id: requestParameters.config_id,
                experiment_id: requestParameters.experiment_id,
                environments: requestParameters.environments
            };
            const localVarAxiosArgs = await localVarAxiosParamCreator.deployConfig(requestParameters.projectId, environmentProjectConfigRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Export all logged datapoints associated to your project.  Results are paginated and sorts the datapoints based on `created_at` in descending order.
         * @summary Export
         * @param {ProjectsApiExportRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async export(requestParameters: ProjectsApiExportRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedDataLogResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.export(requestParameters.id, requestParameters.page, requestParameters.size, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Get a specific project.
         * @summary Get
         * @param {ProjectsApiGetRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async get(requestParameters: ProjectsApiGetRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.get(requestParameters.id, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Retrieves a config to use to execute your model.  A config will be selected based on the project\'s active config/experiment settings.
         * @summary Get Active Config
         * @param {ProjectsApiGetActiveConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getActiveConfig(requestParameters: ProjectsApiGetActiveConfigRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetModelConfigResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getActiveConfig(requestParameters.id, requestParameters.environment, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Get a paginated list of projects.
         * @summary List
         * @param {ProjectsApiListRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async list(requestParameters: ProjectsApiListRequest = {}, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedDataProjectResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.list(requestParameters.page, requestParameters.size, requestParameters.filter, requestParameters.userFilter, requestParameters.sortBy, requestParameters.order, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Get an array of configs associated to your project.
         * @summary List Configs
         * @param {ProjectsApiListConfigsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listConfigs(requestParameters: ProjectsApiListConfigsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ProjectConfigResponse>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listConfigs(requestParameters.id, requestParameters.evaluationAggregates, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Get an array of environments with the deployed configs associated to your project.
         * @summary List Deployed Configs
         * @param {ProjectsApiListDeployedConfigsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listDeployedConfigs(requestParameters: ProjectsApiListDeployedConfigsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<EnvironmentProjectConfigResponse>>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.listDeployedConfigs(requestParameters.id, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Update a specific project.  Set the project\'s active model config/experiment by passing either `active_experiment_id` or `active_model_config_id`. These will be set to the Default environment unless a list of environments are also passed in specifically detailing which environments to assign the active config or experiment.  Set the feedback labels to be treated as positive user feedback used in calculating top-level project metrics by passing a list of labels in `positive_labels`.
         * @summary Update
         * @param {ProjectsApiUpdateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async update(requestParameters: ProjectsApiUpdateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectResponse>> {
            const updateProjectRequest: UpdateProjectRequest = {
                name: requestParameters.name,
                active_experiment_id: requestParameters.active_experiment_id,
                active_config_id: requestParameters.active_config_id,
                positive_labels: requestParameters.positive_labels,
                directory_id: requestParameters.directory_id
            };
            const localVarAxiosArgs = await localVarAxiosParamCreator.update(requestParameters.id, updateProjectRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Update feedback types.  Allows enabling the available feedback types and setting status of feedback types/categorical values.  This behaves like an upsert; any feedback categorical values that do not already exist in the project will be created.
         * @summary Update Feedback Types
         * @param {ProjectsApiUpdateFeedbackTypesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateFeedbackTypes(requestParameters: ProjectsApiUpdateFeedbackTypesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<FeedbackTypeModel>>> {
            const feedbackTypeRequest: Array<FeedbackTypeRequest> = requestParameters.requestBody;
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateFeedbackTypes(requestParameters.id, feedbackTypeRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * ProjectsApi - factory interface
 * @export
 */
export const ProjectsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = ProjectsApiFp(configuration)
    return {
        /**
         * Create a new project.
         * @summary Create
         * @param {ProjectsApiCreateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        create(requestParameters: ProjectsApiCreateRequest, options?: AxiosRequestConfig): AxiosPromise<ProjectResponse> {
            return localVarFp.create(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * 
         * @summary Create Feedback Type
         * @param {ProjectsApiCreateFeedbackTypeRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createFeedbackType(requestParameters: ProjectsApiCreateFeedbackTypeRequest, options?: AxiosRequestConfig): AxiosPromise<FeedbackTypeModel> {
            return localVarFp.createFeedbackType(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Remove the project\'s active config, if set.  This has no effect if the project does not have an active model config set.
         * @summary Deactivate Config
         * @param {ProjectsApiDeactivateConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deactivateConfig(requestParameters: ProjectsApiDeactivateConfigRequest, options?: AxiosRequestConfig): AxiosPromise<ProjectResponse> {
            return localVarFp.deactivateConfig(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Remove the project\'s active experiment, if set.  This has no effect if the project does not have an active experiment set.
         * @summary Deactivate Experiment
         * @param {ProjectsApiDeactivateExperimentRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deactivateExperiment(requestParameters: ProjectsApiDeactivateExperimentRequest, options?: AxiosRequestConfig): AxiosPromise<ProjectResponse> {
            return localVarFp.deactivateExperiment(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Delete a specific project.
         * @summary Delete
         * @param {ProjectsApiDeleteRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delete(requestParameters: ProjectsApiDeleteRequest, options?: AxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.delete(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Remove the model config deployed to environment.  This has no effect if the project does not have an active model config set.
         * @summary Delete Deployed Config
         * @param {ProjectsApiDeleteDeployedConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDeployedConfig(requestParameters: ProjectsApiDeleteDeployedConfigRequest, options?: AxiosRequestConfig): AxiosPromise<object> {
            return localVarFp.deleteDeployedConfig(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Deploy a model config to an environment.  If the environment already has a model config deployed, it will be replaced.
         * @summary Deploy Config
         * @param {ProjectsApiDeployConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deployConfig(requestParameters: ProjectsApiDeployConfigRequest, options?: AxiosRequestConfig): AxiosPromise<Array<EnvironmentProjectConfigResponse>> {
            return localVarFp.deployConfig(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Export all logged datapoints associated to your project.  Results are paginated and sorts the datapoints based on `created_at` in descending order.
         * @summary Export
         * @param {ProjectsApiExportRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        export(requestParameters: ProjectsApiExportRequest, options?: AxiosRequestConfig): AxiosPromise<PaginatedDataLogResponse> {
            return localVarFp.export(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Get a specific project.
         * @summary Get
         * @param {ProjectsApiGetRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        get(requestParameters: ProjectsApiGetRequest, options?: AxiosRequestConfig): AxiosPromise<ProjectResponse> {
            return localVarFp.get(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Retrieves a config to use to execute your model.  A config will be selected based on the project\'s active config/experiment settings.
         * @summary Get Active Config
         * @param {ProjectsApiGetActiveConfigRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getActiveConfig(requestParameters: ProjectsApiGetActiveConfigRequest, options?: AxiosRequestConfig): AxiosPromise<GetModelConfigResponse> {
            return localVarFp.getActiveConfig(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Get a paginated list of projects.
         * @summary List
         * @param {ProjectsApiListRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        list(requestParameters: ProjectsApiListRequest = {}, options?: AxiosRequestConfig): AxiosPromise<PaginatedDataProjectResponse> {
            return localVarFp.list(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Get an array of configs associated to your project.
         * @summary List Configs
         * @param {ProjectsApiListConfigsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listConfigs(requestParameters: ProjectsApiListConfigsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<ProjectConfigResponse>> {
            return localVarFp.listConfigs(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Get an array of environments with the deployed configs associated to your project.
         * @summary List Deployed Configs
         * @param {ProjectsApiListDeployedConfigsRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDeployedConfigs(requestParameters: ProjectsApiListDeployedConfigsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<EnvironmentProjectConfigResponse>> {
            return localVarFp.listDeployedConfigs(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a specific project.  Set the project\'s active model config/experiment by passing either `active_experiment_id` or `active_model_config_id`. These will be set to the Default environment unless a list of environments are also passed in specifically detailing which environments to assign the active config or experiment.  Set the feedback labels to be treated as positive user feedback used in calculating top-level project metrics by passing a list of labels in `positive_labels`.
         * @summary Update
         * @param {ProjectsApiUpdateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update(requestParameters: ProjectsApiUpdateRequest, options?: AxiosRequestConfig): AxiosPromise<ProjectResponse> {
            return localVarFp.update(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Update feedback types.  Allows enabling the available feedback types and setting status of feedback types/categorical values.  This behaves like an upsert; any feedback categorical values that do not already exist in the project will be created.
         * @summary Update Feedback Types
         * @param {ProjectsApiUpdateFeedbackTypesRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateFeedbackTypes(requestParameters: ProjectsApiUpdateFeedbackTypesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<FeedbackTypeModel>> {
            return localVarFp.updateFeedbackTypes(requestParameters, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for create operation in ProjectsApi.
 * @export
 * @interface ProjectsApiCreateRequest
 */
export type ProjectsApiCreateRequest = {
    
} & CreateProjectRequest

/**
 * Request parameters for createFeedbackType operation in ProjectsApi.
 * @export
 * @interface ProjectsApiCreateFeedbackTypeRequest
 */
export type ProjectsApiCreateFeedbackTypeRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiCreateFeedbackType
    */
    readonly id: string
    
} & FeedbackTypeRequest

/**
 * Request parameters for deactivateConfig operation in ProjectsApi.
 * @export
 * @interface ProjectsApiDeactivateConfigRequest
 */
export type ProjectsApiDeactivateConfigRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiDeactivateConfig
    */
    readonly id: string
    
    /**
    * Name for the environment. E.g. \'production\'. If not provided, will delete the active config for the default environment.
    * @type {string}
    * @memberof ProjectsApiDeactivateConfig
    */
    readonly environment?: string
    
}

/**
 * Request parameters for deactivateExperiment operation in ProjectsApi.
 * @export
 * @interface ProjectsApiDeactivateExperimentRequest
 */
export type ProjectsApiDeactivateExperimentRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiDeactivateExperiment
    */
    readonly id: string
    
    /**
    * Name for the environment. E.g. \'producton\'. If not provided, will return the experiment for the default environment.
    * @type {string}
    * @memberof ProjectsApiDeactivateExperiment
    */
    readonly environment?: string
    
}

/**
 * Request parameters for delete operation in ProjectsApi.
 * @export
 * @interface ProjectsApiDeleteRequest
 */
export type ProjectsApiDeleteRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiDelete
    */
    readonly id: string
    
}

/**
 * Request parameters for deleteDeployedConfig operation in ProjectsApi.
 * @export
 * @interface ProjectsApiDeleteDeployedConfigRequest
 */
export type ProjectsApiDeleteDeployedConfigRequest = {
    
    /**
    * 
    * @type {string}
    * @memberof ProjectsApiDeleteDeployedConfig
    */
    readonly projectId: string
    
    /**
    * 
    * @type {string}
    * @memberof ProjectsApiDeleteDeployedConfig
    */
    readonly environmentId: string
    
}

/**
 * Request parameters for deployConfig operation in ProjectsApi.
 * @export
 * @interface ProjectsApiDeployConfigRequest
 */
export type ProjectsApiDeployConfigRequest = {
    
    /**
    * 
    * @type {string}
    * @memberof ProjectsApiDeployConfig
    */
    readonly projectId: string
    
} & EnvironmentProjectConfigRequest

/**
 * Request parameters for export operation in ProjectsApi.
 * @export
 * @interface ProjectsApiExportRequest
 */
export type ProjectsApiExportRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiExport
    */
    readonly id: string
    
    /**
    * Page offset for pagination.
    * @type {number}
    * @memberof ProjectsApiExport
    */
    readonly page?: number
    
    /**
    * Page size for pagination. Number of logs to export.
    * @type {number}
    * @memberof ProjectsApiExport
    */
    readonly size?: number
    
}

/**
 * Request parameters for get operation in ProjectsApi.
 * @export
 * @interface ProjectsApiGetRequest
 */
export type ProjectsApiGetRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiGet
    */
    readonly id: string
    
}

/**
 * Request parameters for getActiveConfig operation in ProjectsApi.
 * @export
 * @interface ProjectsApiGetActiveConfigRequest
 */
export type ProjectsApiGetActiveConfigRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiGetActiveConfig
    */
    readonly id: string
    
    /**
    * Name for the environment. E.g. \'producton\'. If not provided, will return the active config for the default environment.
    * @type {string}
    * @memberof ProjectsApiGetActiveConfig
    */
    readonly environment?: string
    
}

/**
 * Request parameters for list operation in ProjectsApi.
 * @export
 * @interface ProjectsApiListRequest
 */
export type ProjectsApiListRequest = {
    
    /**
    * Page offset for pagination.
    * @type {number}
    * @memberof ProjectsApiList
    */
    readonly page?: number
    
    /**
    * Page size for pagination. Number of projects to fetch.
    * @type {number}
    * @memberof ProjectsApiList
    */
    readonly size?: number
    
    /**
    * Case-insensitive filter for project name.
    * @type {string}
    * @memberof ProjectsApiList
    */
    readonly filter?: string
    
    /**
    * Case-insensitive filter for users in the project. This filter matches against both email address and name of users.
    * @type {string}
    * @memberof ProjectsApiList
    */
    readonly userFilter?: string
    
    /**
    * Field to sort projects by
    * @type {ProjectSortBy}
    * @memberof ProjectsApiList
    */
    readonly sortBy?: ProjectSortBy
    
    /**
    * Direction to sort by.
    * @type {SortOrder}
    * @memberof ProjectsApiList
    */
    readonly order?: SortOrder
    
}

/**
 * Request parameters for listConfigs operation in ProjectsApi.
 * @export
 * @interface ProjectsApiListConfigsRequest
 */
export type ProjectsApiListConfigsRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiListConfigs
    */
    readonly id: string
    
    /**
    * 
    * @type {boolean}
    * @memberof ProjectsApiListConfigs
    */
    readonly evaluationAggregates?: boolean
    
}

/**
 * Request parameters for listDeployedConfigs operation in ProjectsApi.
 * @export
 * @interface ProjectsApiListDeployedConfigsRequest
 */
export type ProjectsApiListDeployedConfigsRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiListDeployedConfigs
    */
    readonly id: string
    
}

/**
 * Request parameters for update operation in ProjectsApi.
 * @export
 * @interface ProjectsApiUpdateRequest
 */
export type ProjectsApiUpdateRequest = {
    
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiUpdate
    */
    readonly id: string
    
} & UpdateProjectRequest

/**
 * Request parameters for updateFeedbackTypes operation in ProjectsApi.
 * @export
 * @interface ProjectsApiUpdateFeedbackTypesRequest
 */
export type ProjectsApiUpdateFeedbackTypesRequest = {
    /**
    * String ID of project. Starts with `pr_`.
    * @type {string}
    * @memberof ProjectsApiUpdateFeedbackTypes
    */
    readonly id: string
    /**
    * 
    * @type {Array<FeedbackTypeRequest>}
    * @memberof ProjectsApiUpdateFeedbackTypes
    */
    readonly requestBody: Array<FeedbackTypeRequest>
}

/**
 * ProjectsApiGenerated - object-oriented interface
 * @export
 * @class ProjectsApiGenerated
 * @extends {BaseAPI}
 */
export class ProjectsApiGenerated extends BaseAPI {
    /**
     * Create a new project.
     * @summary Create
     * @param {ProjectsApiCreateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public create(requestParameters: ProjectsApiCreateRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).create(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary Create Feedback Type
     * @param {ProjectsApiCreateFeedbackTypeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public createFeedbackType(requestParameters: ProjectsApiCreateFeedbackTypeRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).createFeedbackType(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Remove the project\'s active config, if set.  This has no effect if the project does not have an active model config set.
     * @summary Deactivate Config
     * @param {ProjectsApiDeactivateConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public deactivateConfig(requestParameters: ProjectsApiDeactivateConfigRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).deactivateConfig(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Remove the project\'s active experiment, if set.  This has no effect if the project does not have an active experiment set.
     * @summary Deactivate Experiment
     * @param {ProjectsApiDeactivateExperimentRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public deactivateExperiment(requestParameters: ProjectsApiDeactivateExperimentRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).deactivateExperiment(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Delete a specific project.
     * @summary Delete
     * @param {ProjectsApiDeleteRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public delete(requestParameters: ProjectsApiDeleteRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).delete(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Remove the model config deployed to environment.  This has no effect if the project does not have an active model config set.
     * @summary Delete Deployed Config
     * @param {ProjectsApiDeleteDeployedConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public deleteDeployedConfig(requestParameters: ProjectsApiDeleteDeployedConfigRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).deleteDeployedConfig(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Deploy a model config to an environment.  If the environment already has a model config deployed, it will be replaced.
     * @summary Deploy Config
     * @param {ProjectsApiDeployConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public deployConfig(requestParameters: ProjectsApiDeployConfigRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).deployConfig(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Export all logged datapoints associated to your project.  Results are paginated and sorts the datapoints based on `created_at` in descending order.
     * @summary Export
     * @param {ProjectsApiExportRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public export(requestParameters: ProjectsApiExportRequest, options?: AxiosRequestConfig) {
        return paginate({
            initialParameters: requestParameters,
            request: (parameters: ProjectsApiExportRequest) => {
                return ProjectsApiFp(this.configuration).export(parameters, options).then((request) => request(this.axios, this.basePath));
            },
        });
    }

    /**
     * Get a specific project.
     * @summary Get
     * @param {ProjectsApiGetRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public get(requestParameters: ProjectsApiGetRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).get(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Retrieves a config to use to execute your model.  A config will be selected based on the project\'s active config/experiment settings.
     * @summary Get Active Config
     * @param {ProjectsApiGetActiveConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public getActiveConfig(requestParameters: ProjectsApiGetActiveConfigRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).getActiveConfig(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get a paginated list of projects.
     * @summary List
     * @param {ProjectsApiListRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public list(requestParameters: ProjectsApiListRequest = {}, options?: AxiosRequestConfig) {
        return paginate({
            initialParameters: requestParameters,
            request: (parameters: ProjectsApiListRequest) => {
                return ProjectsApiFp(this.configuration).list(parameters, options).then((request) => request(this.axios, this.basePath));
            },
        });
    }

    /**
     * Get an array of configs associated to your project.
     * @summary List Configs
     * @param {ProjectsApiListConfigsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public listConfigs(requestParameters: ProjectsApiListConfigsRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).listConfigs(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Get an array of environments with the deployed configs associated to your project.
     * @summary List Deployed Configs
     * @param {ProjectsApiListDeployedConfigsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public listDeployedConfigs(requestParameters: ProjectsApiListDeployedConfigsRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).listDeployedConfigs(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update a specific project.  Set the project\'s active model config/experiment by passing either `active_experiment_id` or `active_model_config_id`. These will be set to the Default environment unless a list of environments are also passed in specifically detailing which environments to assign the active config or experiment.  Set the feedback labels to be treated as positive user feedback used in calculating top-level project metrics by passing a list of labels in `positive_labels`.
     * @summary Update
     * @param {ProjectsApiUpdateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public update(requestParameters: ProjectsApiUpdateRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).update(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update feedback types.  Allows enabling the available feedback types and setting status of feedback types/categorical values.  This behaves like an upsert; any feedback categorical values that do not already exist in the project will be created.
     * @summary Update Feedback Types
     * @param {ProjectsApiUpdateFeedbackTypesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ProjectsApiGenerated
     */
    public updateFeedbackTypes(requestParameters: ProjectsApiUpdateFeedbackTypesRequest, options?: AxiosRequestConfig) {
        return ProjectsApiFp(this.configuration).updateFeedbackTypes(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }
}
